﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace MMSdal
{
    public partial class chuang : Form
    {
        public chuang()
        {
            InitializeComponent();
        }

        private void chuang_KeyUp(object sender, KeyEventArgs e)
        {
            if (e.KeyCode ==Keys.F2)
            {
                textBox1.Focus();
            }
        }

        private void button1_Click(object sender, EventArgs e)
        {
           
                MessageBox.Show(textBox1.Text);
                textBox1.Text = "";
           
        }

        private void textBox1_KeyUp(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
            {
                if (textBox1.Text != "")
                {
                    button1_Click(null, null);
                }
            }
        }

        

        

        
    
        

    


  

       

     

     
      
    }
}
